<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/raw.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('raw_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">raw.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pbuf_8h.html">lwip/pbuf.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="def_8h.html">lwip/def.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip_8h.html">lwip/ip.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip__addr_8h.html">lwip/ip_addr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip6__addr_8h.html">lwip/ip6_addr.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structraw__pcb.html">raw_pcb</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a17edd059f34f45a770fe2fa458ecf4dd"><td class="memItemLeft" align="right" valign="top">typedef u8_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="raw_8h.html#a17edd059f34f45a770fe2fa458ecf4dd">raw_recv_fn</a>) (void *arg, struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr)</td></tr>
<tr class="separator:a17edd059f34f45a770fe2fa458ecf4dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3217f096ea86728e011f91b249933e8f"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga3217f096ea86728e011f91b249933e8f">raw_new</a> (u8_t proto)</td></tr>
<tr class="separator:ga3217f096ea86728e011f91b249933e8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3292b7ed2271ac29983edcef16dcbc11"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga3292b7ed2271ac29983edcef16dcbc11">raw_new_ip_type</a> (u8_t type, u8_t proto)</td></tr>
<tr class="separator:ga3292b7ed2271ac29983edcef16dcbc11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8db62f7d75f722a653b5368305a47e16"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga8db62f7d75f722a653b5368305a47e16">raw_remove</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb)</td></tr>
<tr class="separator:ga8db62f7d75f722a653b5368305a47e16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8576dbbc7f03797525d2cdb7ec3b9fe4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga8576dbbc7f03797525d2cdb7ec3b9fe4">raw_bind</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *ipaddr)</td></tr>
<tr class="separator:ga8576dbbc7f03797525d2cdb7ec3b9fe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa124ac8a9479aebefe2c953629df591a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#gaa124ac8a9479aebefe2c953629df591a">raw_bind_netif</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, const struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr class="separator:gaa124ac8a9479aebefe2c953629df591a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga31bb29c964d5e2f734e563485fc25168"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga31bb29c964d5e2f734e563485fc25168">raw_connect</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *ipaddr)</td></tr>
<tr class="separator:ga31bb29c964d5e2f734e563485fc25168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7634c0306e2c6f8040e35f6547e8d3ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga7634c0306e2c6f8040e35f6547e8d3ef">raw_disconnect</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb)</td></tr>
<tr class="separator:ga7634c0306e2c6f8040e35f6547e8d3ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09427456070fb610cc7795d23dedc159"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga09427456070fb610cc7795d23dedc159">raw_sendto</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *ipaddr)</td></tr>
<tr class="separator:ga09427456070fb610cc7795d23dedc159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2fe3765ae938a3f7c53dc7051b7ab0b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#ga2fe3765ae938a3f7c53dc7051b7ab0b1">raw_sendto_if_src</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *dst_ip, struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *src_ip)</td></tr>
<tr class="separator:ga2fe3765ae938a3f7c53dc7051b7ab0b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbc2e7c7a1b4429f420562d4f31b3a9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#gabbc2e7c7a1b4429f420562d4f31b3a9d">raw_send</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p)</td></tr>
<tr class="separator:gabbc2e7c7a1b4429f420562d4f31b3a9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf84e4e6911ce3c0d7f5669b6edac426"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__raw__raw.html#gadf84e4e6911ce3c0d7f5669b6edac426">raw_recv</a> (struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, <a class="el" href="raw_8h.html#a17edd059f34f45a770fe2fa458ecf4dd">raw_recv_fn</a> <a class="el" href="group__socket.html#gadd7ae45df7c005619eb1126542231e9b">recv</a>, void *recv_arg)</td></tr>
<tr class="separator:gadf84e4e6911ce3c0d7f5669b6edac426"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>raw API (to be used from TCPIP thread)<br />
See also <a class="el" href="group__raw__raw.html">RAW</a> </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a17edd059f34f45a770fe2fa458ecf4dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17edd059f34f45a770fe2fa458ecf4dd">&#9670;&nbsp;</a></span>raw_recv_fn</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef u8_t(* raw_recv_fn) (void *arg, struct <a class="el" href="structraw__pcb.html">raw_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function prototype for raw pcb receive callback functions. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">arg</td><td>user supplied argument (raw_pcb.recv_arg) </td></tr>
    <tr><td class="paramname">pcb</td><td>the <a class="el" href="structraw__pcb.html">raw_pcb</a> which received data </td></tr>
    <tr><td class="paramname">p</td><td>the packet buffer that was received </td></tr>
    <tr><td class="paramname">addr</td><td>the remote IP address from which the packet was received </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the packet was 'eaten' (aka. deleted), 0 if the packet lives on If returning 1, the callback is responsible for freeing the pbuf if it's not used any more. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="raw_8h.html">raw.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
